import Vue from "vue";
import Router from "vue-router";
import Home from "../components/Home.vue";
import admin from "../components/count/admin";
import zhubo from "../components/count/zhubo";
import goods from "../components/business/goods";
import sales from "../components/business/sales";
import profit from "../components/business/profit";
import mine from "../components/Center/mine";
import password from "../components/Center/password";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: Home,
      component: Home,
      children: [
        { path: "/admin", name: admin, component: admin },
        { path: "/zhubo", name: zhubo, component: zhubo },
        {
          path: "/goods",
          name: goods,
          component: goods
        },
        {
          path: "/sales",
          name: sales,
          component: sales
        },
        {
          path: "/profit",
          name: profit,
          component: profit
        },
        {
          path: "/mine",
          name: mine,
          component: mine
        },
        {
          path: "/password",
          name: password,
          component: password
        }
      ]
    }
  ]
});
